package cn.tdeu.spring.config;

import cn.tdeu.spring.eg1.Product;
import cn.tdeu.spring.fie.Database;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestSpringConfig {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext
                (SpringConfig.class);


        Database bean = context.getBean(Database.class);
        System.out.println(bean);


        Product bean1 = context.getBean(Product.class);
        System.out.println(bean1);

    }
}
